package com.yanqu.road.entity.log;

import com.yanqu.road.entity.FieldTypeAnnotation;

import java.util.Date;

@FieldTypeAnnotation(tableName = "t_l_online_time", autoSave = true)
public class LogOnlineTime {

    @FieldTypeAnnotation(isIndex = true)
    private long userId;

    @FieldTypeAnnotation(desc = "在线时长，单位ms")
    private long onlineTime;

    @FieldTypeAnnotation(desc = "0点时间标识")
    private long timeMark;

    @FieldTypeAnnotation(desc = "时间")
    private Date logTime;

    public LogOnlineTime(long userId, long onlineTime, long timeMark) {
        this.userId = userId;
        this.onlineTime = onlineTime;
        this.timeMark = timeMark;
        this.logTime = new Date();
    }

    public long getUserId() {
        return userId;
    }

    public void setUserId(long userId) {
        this.userId = userId;
    }

    public long getOnlineTime() {
        return onlineTime;
    }

    public void setOnlineTime(long onlineTime) {
        this.onlineTime = onlineTime;
    }

    public long getTimeMark() {
        return timeMark;
    }

    public void setTimeMark(long timeMark) {
        this.timeMark = timeMark;
    }

    public Date getLogTime() {
        return logTime;
    }

    public void setLogTime(Date logTime) {
        this.logTime = logTime;
    }
}
